package com.phaeton.beemeup.entity;

import org.andengine.entity.sprite.Sprite;
import org.andengine.opengl.texture.region.ITextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

import android.util.Log;

import com.phaeton.beemeup.util.Coordinate;

public class Cell extends Sprite{
	public static final int
				FREE = 0,
				IS_FLOWER = 1, 
				IS_BEECOMB = 2,
				IS_WASPCOMB = 4;
	
	private Coordinate dim;
	private int state;
	private int col, row;
	
	public Cell(int col, int row, float x, float y, ITextureRegion tex, VertexBufferObjectManager vbo) {
		super(x, y, tex, vbo);
		dim = new Coordinate(col, row);
		this.col = col;
		this.row = row;
	}
	
	public void setPos(int col, int row) {
		dim.setCoordinates(col, row);
	}
	
	public Coordinate getCoordinates() {
		return dim;
	}
	
	public int getState() {
		return state;
	}
	
	public void addState(int state) {
		this.state |= state;
	}
	
	public void removeState(int state) {
		this.state &= ~state;
	}
}
